package edu.jmu.restful;

import java.util.Random;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

/**
 * 会产生同步问题的counter
 * @author zhrb
 *
 */
@Component() 
public class Counter {
	private int count;
	public int incrementAndGet(){
		return count++;
	}
	
	public static int getId(){
		Random random = new Random();
		return random.nextInt(100000000);
	}
}
